/**
 * @Author: skylin
 * @Date:   2016/12/1 11:25
 * @Last Modified by:  skylin
 * @Last Modified time: 2016/12/1 11:25
 */
window.onload=function(){
    //思路 将页面内容当做参数，利用arguments来获取内容执行内容
    new CreateList([
        {
            project: [{
                text: "第一课"
            },
                {
                    text: "控制Div属性",
                    href: "lesson1/01.html"
                },
                {
                    text: "网页换肤",
                    href: "lesson1/02.html"
                },
                {
                    text: "函数接收参数并弹出",
                    href: "lesson1/03.html"
                },
                {
                    text: "用循环将三个Div变成红色",
                    href: "lesson1/04.html"
                },
                {
                    text: "鼠标移入/移出改变样式",
                    href: "lesson1/05.html"
                },
                {
                    text: "记住密码提示框",
                    href: "lesson1/06.html"
                }]
        },
        {
            project: [{
                text: "第二课"
            },
                {
                    text: "百度输入法",
                    href: "lesson2/01.html"
                },
                {
                    text: "点击Div，显示其innerHTML",
                    href: "lesson2/02.html"
                },
                {
                    text: "求出数组中所有数字的和",
                    href: "lesson2/03.html"
                },
                {
                    text: "弹出层效果",
                    href: "lesson2/04.html"
                },
                {
                    text: "函数传参，改变Div任意属性的值",
                    href: "lesson2/05.html"
                },
                {
                    text: "图片列表：鼠标移入/移出改变图片透明度",
                    href: "lesson2/06.html"
                },
                {
                    text: "简易选项卡",
                    href: "lesson2/07.html"
                },
                {
                    text: "简易JS年历",
                    href: "lesson2/08.html"
                },
                {
                    text: "单一按钮显示/隐藏一播放列表收缩展开",
                    href: "lesson2/09.html"
                },
                {
                    text: "提示框效果",
                    href: "lesson2/10.html"
                },
                {
                    text: "鼠标移过，修改图片路径",
                    href: "lesson2/11.html"
                },
                {
                    text: "复选框（checkbox）全选/全不选/返选",
                    href: "lesson2/12.html"
                }]
        },
        {
            project: [{
                text: "第三课"
            },
                {
                    text: "用typeof查看数据类型",
                    href: "lesson3/01.html"
                },
                {
                    text: "用parseInt解析数字，并求和",
                    href: "lesson3/02.html"
                },
                {
                    text: "累加按钮，自加1",
                    href: "lesson3/03.html"
                },
                {
                    text: "输入两个数字，比较大小",
                    href: "lesson3/04.html"
                },
                {
                    text: "页面加载后累加，自加1",
                    href: "lesson3/05.html"
                },
                {
                    text: "判断数字是否为两位数",
                    href: "lesson3/06.html"
                },
                {
                    text: "网页计算器",
                    href: "lesson3/07.html"
                },
                {
                    text: "简易网页时钟",
                    href: "lesson3/08.html"
                },
                {
                    text: "倒计时时钟（100秒）",
                    href: "lesson3/09.html"
                }]
        },
        {
            project: [{
                text: "第四课"
            },
                {
                    text: "setTimeout应用",
                    href: "lesson4/01.html"
                },
                {
                    text: "自动播放一幻灯片效果",
                    href: "lesson4/02.html"
                },
                {
                    text: "自动改变方向一幻灯片效果",
                    href: "lesson4/03.html"
                },
                {
                    text: "agruments应用一求出函数参数的总合",
                    href: "lesson4/04.html"
                },
                {
                    text: "css函数一设置/读取对象的属性",
                    href: "lesson4/05.html"
                },
                {
                    text: "当前输入框高亮显示",
                    href: "lesson4/06.html"
                },
                {
                    text: "数组练习：各种数组方法的使用",
                    href: "lesson4/07.html"
                },
                {
                    text: "事件练习：封装兼容性添加、删除事件的函数",
                    href: "lesson4/08.html"
                },
                {
                    text: "星级评分系统",
                    href: "lesson4/09.html"
                }]
        },
        {
            project: [{
                text: "第五课"
            },
                {
                    text: "模拟select控件",
                    href: "lesson5/01.html"
                },
                {
                    text: "点击页面，显示单击的坐标",
                    href: "lesson5/02.html"
                },
                {
                    text: "用户按下键盘，显示keyCode",
                    href: "lesson5/03.html"
                },
                {
                    text: "阻止右键菜单（阻止默认事件）",
                    href: "lesson5/04.html"
                },
                {
                    text: "跟随鼠标移动（大图展示）",
                    href: "lesson5/05.html"
                },
                {
                    text: "自定义右键菜单",
                    href: "lesson5/06.html"
                },
                {
                    text: "用键盘控制Div",
                    href: "lesson5/07.html"
                },
                {
                    text: "Div闪烁",
                    href: "lesson5/08.html"
                }]
        },
        {
            project: [{
                text: "第六课"
            },
                {
                    text: "完美拖拽",
                    href: "lesson6/01.html"
                },
                {
                    text: "仿腾讯微博效果",
                    href: "lesson6/02.html"
                },
                {
                    text: "自定义多级右键菜单",
                    href: "lesson6/03.html"
                }]
        },
        {
            project: [{
                text: "第七课"
            },
                {
                    text: "自动轮播广告（缓冲效果）",
                    href: "lesson7/01.html"
                },
                {
                    text: "图片切换（Loading效果）",
                    href: "lesson7/02.html"
                },
                {
                    text: "移动效果（按轨迹移动）",
                    href: "lesson7/03.html"
                }]
        },
        {
            project: [{
                text: "第八课"
            },
                {
                    text: "iPhone手机解锁效果",
                    href: "iphone-unlock"
                },
                {
                    text: "自定义滚动条",
                    href: "lesson8/01.html"
                },
                {
                    text: "拖拽一Clone",
                    href: "lesson8/02.html"
                },
                {
                    text: "拖拽并可以改变大小",
                    href: "lesson8/03.html"
                }]
        },
        {
            project: [{
                text: "第九课"
            },
                {
                    text: "仿苹果电脑任务栏菜单",
                    href: "lesson9/01.html"
                },
                {
                    text: "拼图小游戏",
                    href: "lesson9/02.html"
                },
                {
                    text: "模拟表单控件",
                    href: "lesson9/03.html"
                }]
        },
        {
            project: [{
                text: "第十课"
            },
                {
                    text: "为数组添加方法（求和，最大值）",
                    href: "lesson10/01.html"
                },
                {
                    text: "自动轮播广告（面向对象版）",
                    href: "lesson10/02.html"
                },
                {
                    text: "运动框架（面向对象版）",
                    href: "lesson10/03.html"
                },
                {
                    text: "照片墙一多实例演示（面向对象版）",
                    href: "lesson10/04.html"
                },
                {
                    text: "拖拽库（面向对象版）",
                    href: "lesson10/05.html"
                },
                {
                    text: "无缝滚动（面向对象版）",
                    href: "lesson10/06.html"
                },
                {
                    text: "延时加载（面向对象版）",
                    href: "lesson10/07.html"
                },
                {
                    text: "仿腾讯游戏《英雄杀》官网Flash效果",
                    href: "lesson10/08.html"
                },
                {
                    text: "百度有啊通栏展示效果",
                    href: "lesson10/09.html"
                },
                {
                    text: "放烟花效果（面向对象版）",
                    href: "lesson10/10.html"
                },
                {
                    text: "《穿越火线》官网导航菜单",
                    href: "lesson10/11.html"
                },
                {
                    text: "《百度风云榜》TAB切换",
                    href: "lesson10/12.html"
                },
                {
                    text: "IBM官网导航条效果",
                    href: "lesson10/13.html"
                },
                {
                    text: "面试题-动态生成表格",
                    href: "lesson10/14.html"
                }]
        },
        {
            project: [{
                text: "项目实例"
            },
                {
                    text: "眼镜在线试戴",
                    href: "eyeglass"
                },
                {
                    text: "日历组件",
                    href: "calendar"
                },
                {
                    text: "淘宝网-迷你登录",
                    href: "taobao-login"
                },
                {
                    text: "仿Google+ 游戏频道焦点图效果",
                    href: "google"
                }]
        },
        {
            project: [{
                text: "YUI实例"
            },
                {
                    text: "淘宝旅行通用日历组件",
                    href: "calendar/trip-calendar"
                },
                {
                    text: "酒店价格日历",
                    href: "calendar/price-calendar"
                }]
        },
        {
            project: [{
                text: "KISSY实例"
            },
                {
                    text: "KISSY版-酒店价格日历",
                    href: "calendar/hotel-price-calendar"
                },
                {
                    text: "KISSY版-图片浏览组件",
                    href: "lightbox"
                },
                {
                    text: "酒店地图交通与周边",
                    href: "rich-map"
                },
                {
                    text: "多SKU酒店价格中心",
                    href: "price-center/hotel"
                },
                {
                    text: "多SKU门票价格中心",
                    href: "price-center/ticket"
                },
                {
                    text: "新版-多SKU门票价格中心",
                    href: "price-center/newticket"
                }]
        },
    ])
};
function CreateList(){
    this.oWrap=document.createElement('div');
    this.initialize.apply(this,arguments);
}
/*添加混入方法*/
CreateList.extend=CreateList.prototype.extend=function(obj){
    for(var k in obj){
        this[k]=obj[k];
    }
}
CreateList.prototype.extend({
    initialize:function(data){
        var main=document.getElementById('main');
        for(var j=0;j<data.length;j++){
            var project=data[j].project;
            var dl=document.createElement('dl');
            main.appendChild(dl);
            var dt=document.createElement('dt');
            dt.innerHTML=project[0].text;
            dl.appendChild(dt);
            for(var i=1;i<project.length;i++){
                var dd=document.createElement('dd');
                dd.innerHTML=project[i].text;
                dl.appendChild(dd);
            }
        }
    }
})